package common

import (
	"fmt"
	"time"
)

const (
	TraceKey string = "TraceKey" // 非分布式部署，可认为是spanId

)

// 学历是固定的，无需加入数据库
var EducationArr = []string{"大专", "本科", "硕士", "博士"}

// 年级固定
var GradeArr = []string{"2018", "2019", "2020", "2021", "2022", "2023"}

// 错误表头
var ErrStuHeader = []string{"学号", "姓名", "手机号", "学院", "专业", "学历", "年级", "错误信息"}

// 训练详情表头
var TrainLogDetailHeader = []string{"姓名", "学号", "手机号", "学校", "学院", "专业", "学历", "年级", "职业", "成绩", "练习时长", "训练时间"}

// 面试能力表头

var TrainLogSummaryMap = map[string]string{
	"优秀专业能力":  "pro:pos",
	"待提升专业能力": "pro:neg",
	"优秀通用能力":  "gen:pos",
	"待提升通用能力": "gen:neg",
	"个人特质":    "personality",
	"经验特质":    "experience:pos",
	"工具技能":    "tool",
}
var TrainLogSummarySheet = []string{"优秀专业能力", "待提升专业能力", "优秀通用能力", "待提升通用能力", "个人特质", "经验特质", "工具技能"}
var TrainLogPersonalSheet = []string{"面试数据", "优秀专业能力", "待提升专业能力", "优秀通用能力", "待提升通用能力", "个人特质", "经验特质", "工具技能"}
var TrainLogSummaryHeader = []string{"序号", "能力标签", "获得人数", "占比"}
var TrainLogPersonHeader = []string{"序号", "能力标签", "获得场次", "占比"}

// 客户信息表头
var AgentDetailHeader = []string{"客户名称", "联系人", "手机号", "联系人邮箱", "学校名称", "对接人", "对接人手机号", "服务开始时间", "服务结束时间", "剩余时间"}

// 操作日志中的模块名称
var OneModule = []string{"训练记录", "学生管理", "账号管理"}

var TwoModule = []string{"数据列表", "重置密码", "管理员账号"}

var OptionType = []string{"新增", "修改", "删除", "导入", "导出"}

// us3文件路径
var FilePath string = fmt.Sprintf("/static/file/%s/", time.Now().Format("2006-01-02"))
var ExportFilePath string = fmt.Sprintf("/static/efile/%s/", time.Now().Format("2006-01-02"))
var PhotoPath string = fmt.Sprintf("/static/photos/%s/", time.Now().Format("2006-01-02"))
var CareerPhotoPath string = fmt.Sprintf("/static/career_photos/%s/", time.Now().Format("2006-01-02"))
var VpPath string = fmt.Sprintf("/static/vp/%s/", time.Now().Format("2006-01-02"))

// redis key
var RedisCodeKey string = "peilian_code_%s"
var RedisCodeMailFindKey string = "peilian_code_mail_find_%s"
var RedisAccountKey string = "peilian_admin_%s"
var RedisUserLoginKey string = "peilian_user_login_%d" // 用户登录key
var RedisPhoneKey string = "peilian_phone_%s"
var RedisSnoKey string = "peilian_sno_%s"
var RedisAccountCountKey string = "peilian_admin_count_%s_%s"
var RedisFindKey string = "peilian_admin_find_%s"
var RedisSchoolKey string = "peilian_school"
var RedisCriteriaKey string = "peilian_criteria"
var RedisTokenKey string = "peilian_token"
var RedisConsituteSadminKey string = "peilian_consitute_sadmin"
var RedisAgentIsTimeoutKey string = "peilian_agent_timeout_%d"        // 客户是否过期
var RedisConsituteIdsKey string = "peilian_consitute_agent_%d"        // 客户信息
var RedisSpecialTabKey string = "peilian_special_tab_%d"              // 存储专项练习的tab
var RedisSpecialCriteriaKey string = "pelian_special_criteria_%d_%d"  // 能力列表
var RedisSpecialTopicKey string = "peilian_special_topic_%d_%d_%s_%s" // 用户面试过的题组id

var RedisSessionIdsQueue string = "peilian_session_ids_queue"    // session id 队列
var RedisSpecialQueue string = "peilian_special_queue"           // 得分队列
var RedisSpecialInfoKey string = "peilian_special_info_%d"       // 专项练习缓存信息
var RedisHmapScore = "score"                                     // 专项练习的得分
var RedisHmapAudio = "audio"                                     // 专项练习的视频url
var RedisHmapTrans = "status"                                    // 专项练习的翻译状态
var RedisHmapAnswer = "answer"                                   // 专项练习的回答内容
var RedisRetryConn = "retry_conn_%d"                             // 断线重连
var RedisSessionMp3Queue string = "peilian_session_no_mp3_queue" // 一场报告未生成mp3
var RedisCaptchaCodeKey string = "peilian_captcha_%d_%d"         // 验证码内容
var RedisUserInfoKey string = "peilian_user_info_%d"             // 存储用户的信息
var RedisYzTokenKey string = "peilian_yz_token_%s"               // 存储有赞的接口token

var RedisNewReportIconKey string = "peilian_new_report_icon_%d"         // 更新报告用户通知的icon
var RedisNewReportBannerKey string = "peilian_new_report_banner_%d"     // 更新报告用户通知的banner
var RedisNewReportEntranceKey string = "peilian_new_report_entrance_%d" // 更新报告的入口

var RedisSetMaskRIdKey string = "peilian_set_mask_rid_%d"   // redis setkey
var RedisTopicNewUid string = "peilian_topic_new_uid_%d"    // 该用户是否已经被弹窗
var RedisTopicNewNotify string = "peilian_topic_new_notify" // 是否开启新题通知功能

var RedisResumeIsViewedKey = "peilian_resume_is_viewed_user_%d"     // 该用户未被查看的简历详情
var RedisResumeIsGenerateKey = "peilian_resume_is_generate_user_%d" // 该用户生成中的简历详情

// redis 模拟队列
var RedisQueueConstituteIds string = "peilian_queue_ids" //sadmin显示 侧边栏

// 游客今日是否已经分享并且次数进行叠加
var RedisShareIsKey string = "peilian_anonymous_is_share_%d" // 游客是否分享

// redis 设置游客默认次数
var RedisDefaultTrailCount string = "peilian_default_trail_count" // 游客默认分享次数

// 代理方同时登录的用户
var RedisAgentLoginUsers string = "peilian_agent_login_users_%d" // (同时)登录的所有用户
var RedisAgentCatch string = "peilian_agent_catch_%d"            // agent 的缓存

var RedisAppletsUser string = "peilian_applets_user_%d"         // agent 的缓存
var RedisAppletsUserSet string = "peilian_applets_users_set_%d" // agent 的缓存

// 提供的api
var RedisSessionClient string = "peilian_session_%d"                    // 缓存client信息
var RedisSessionSampleRules string = "peilian_sample_rules_%d"          // 抽题规则
var RedisSessionNewQuestionInfo string = "peilian_new_question_info_%d" // 缓存最新题目的信息
var RedisSessionLabel string = "peilian_session_label_%d_%d"            // 缓存的标签 session_id + question_id

var RedisHbQuestionInfo string = "peilian_question_hb_%d_%d" // 河北冀才网redis

// 游客面试默认次数
var DefaultUserTrailCount = 1

// 过期时间
var AgentTimeKey int64 = 0

// 会员映射
var MemberTypeMap = map[int]string{
	1: "日卡",
	2: "周卡",
	3: "月卡",
	4: "季卡",
	5: "半年卡",
	6: "年卡",
}

// 盒子默认登录过期时间
var BoxExpirationTime = 30 * time.Minute
var DateTimeFormat = "2006-01-02 15:04:05"
